<% if deployed = @project.last_deploy_by_stage %>
  <div class="form-group clickable-releases">
    <label class="col-lg-2 control-label">Currently deployed</label>
    <div class="col-lg-4" style="max-height: 300px; overflow: auto">
      <table class="table-condensed">
        <% deployed.each do |deploy| %>
          <tr>
            <td>
              <%= link_to deploy.stage.name, [@project, deploy.stage] %>
            </td>
            <td><%= link_to deploy.short_reference, "#", class: "status label #{status_label(deploy.status)}", data: {ref: deploy.short_reference} %></td>
          </tr>
        <% end %>
      </table>
    </div>
  </div>
<% end %>
